//
//  ChatViewController.m
//  lzl9-28
//
//  Created by 长 on 16/9/29.
//  Copyright © 2016年 lzl. All rights reserved.
//

#import "ChatViewController.h"

@interface ChatViewController ()

@end

@implementation ChatViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    
    self.tableView.estimatedRowHeight = 44;
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    if(indexPath.row % 2 == 0) {
        LeftchatCell *cell = [tableView dequeueReusableCellWithIdentifier:@"leftchat" forIndexPath:indexPath];
        cell.bubble.image = [cell.bubble.image resizableImageWithCapInsets:UIEdgeInsetsMake(30, 30, 15, 30)];
        cell.content.text = @"yes";
     
    
        return cell;
    
    
    
    
    }else{
        RightchatCell *cell = [tableView dequeueReusableCellWithIdentifier:@"rightchat" forIndexPath:indexPath ]
    
    
    }



}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
